package com.wen.control;

import com.wen.bean.UserInfoBean;
import com.wen.service.LoginService;

import java.util.List;

public class LoginControl {
    //使用spring xml配置方式进行依赖注入

    UserInfoBean userInfoBean;
    LoginService loginService;

    //依赖一个集合对象也可以依赖注入

    List<Object> listStr;

    /**
     * 进行登录处理
     * @return 登录结果
     */
    public boolean doLogin(){
        boolean canLogined = false;
        //调用service层
        System.out.println("依赖的集合内容："+listStr.toString());
        //进行登录业务处理
        canLogined = loginService.doLogin(userInfoBean);
        return canLogined;
    }

    public UserInfoBean getUserInfoBean() {
        return userInfoBean;
    }

    public void setUserInfoBean(UserInfoBean userInfoBean) {
        this.userInfoBean = userInfoBean;
    }

    public LoginService getLoginService() {
        return loginService;
    }

    public void setLoginService(LoginService loginService) {
        this.loginService = loginService;
    }

    public List<Object> getListStr() {
        return listStr;
    }

    public void setListStr(List<Object> listStr) {
        this.listStr = listStr;
    }
}
